﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/ripple.master" CodeFile="Default.aspx.cs"
    Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="ID" DataSourceID="AccessDataSource1" EmptyDataText="There are no data records to display.">
        <Columns>
            <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" SortExpression="ID" />
            <asp:BoundField DataField="username" HeaderText="username" SortExpression="username" />
            <asp:BoundField DataField="zip" HeaderText="zip" SortExpression="zip" />
        </Columns>
    </asp:GridView>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="App_Data\UserData.mdb"
        DeleteCommand="DELETE FROM `UserData` WHERE `ID` = ?" InsertCommand="INSERT INTO `UserData` (`ID`, `username`, `zip`) VALUES (?, ?, ?)"
        SelectCommand="SELECT `ID`, `username`, `zip` FROM `UserData`" UpdateCommand="UPDATE `UserData` SET `username` = ?, `zip` = ? WHERE `ID` = ?">
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="username" Type="String" />
            <asp:Parameter Name="zip" Type="String" />
        </InsertParameters>
        <DeleteParameters>
            <asp:Parameter Name="ID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="username" Type="String" />
            <asp:Parameter Name="zip" Type="String" />
            <asp:Parameter Name="ID" Type="Int32" />
        </UpdateParameters>
    </asp:AccessDataSource>
</asp:Content>
